package com.ktgj.customer.mapper;

import java.util.List;
import com.ktgj.customer.domain.Department;
import com.ktgj.customer.domain.dto.DepartmentTreeSelectDTO;

/**
 * 部门Mapper接口
 * 
 * @author ruoyi
 * @date 2021-07-27
 */
public interface DepartmentMapper 
{
    /**
     * 查询部门
     * 
     * @param deptId 部门ID
     * @return 部门
     */
    public Department selectDepartmentById(Long deptId);

    /**
     * 查询部门列表
     * 
     * @param department 部门
     * @return 部门集合
     */
    public List<Department> selectDepartmentList(Department department);

    /**
     * 新增部门
     * 
     * @param department 部门
     * @return 结果
     */
    public int insertDepartment(Department department);

    /**
     * 修改部门
     * 
     * @param department 部门
     * @return 结果
     */
    public int updateDepartment(Department department);

    /**
     * 删除部门
     * 
     * @param deptId 部门ID
     * @return 结果
     */
    public int deleteDepartmentById(Long deptId);

    /**
     * 批量删除部门
     * 
     * @param deptIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteDepartmentByIds(Long[] deptIds);

    int queryEmployeeCountByDeptId(Long deptId);

    List<DepartmentTreeSelectDTO> getAll();

    /**
     * 查询指定部门
     * */
    public Department selectDepartment(Long deptId);

    /**
     * 部门列表
     * */
    public List<Department> selectDepartmentByList();

    public List<Department> selectDepartmentSon(Long deptId);

    /**
     * 名称查部门
     * */
    public Department selectDepartmentByName(String deptName);

    /**
     * 获取部门列表
     * */
    public List<Department> departmentList(Long deptId);

    /**
     * 部门列表
     * */
    public List<Department> departments();
}
